1. Field of the Invention
The present invention relates generally to facsimile devices and, more particularly, to a facsimile device capable of transmitting an image in high efficiency.
2. Description of the Related Art
In recent years, facsimile devices have been playing a significant role in the field of data communication. The facsimile devices serve to read images printed or hand-written on paper or the like by employing scanners including, for example, CCD (Charge-Coupled Device) image sensors and to convert the read images into a digital signal. This digital signal is converted into a compressed digital signal by a coding system called MH (Modified Huffman), MR (Modified READ), MMR (Modified MR), etc. The compressed digital signal is then converted into an analog signal, which is then transmitted onto telephone lines.
FIG. 1 shows the principle of reading of an original in a facsimile device in accordance with the CCITT recommendation. With reference to FIG. 1, an original 10 of ISOA4 size, for example, is read in a main scanning direction by a CCD sensor or the like. One main scanning line is divided into 1728 pixels and then converted into a digital signal in accordance with the luminance thereof. Main scanning is repeated repeats in a sub scanning direction orthogonal to the main scanning direction. When the scanning in the sub scanning direction is completed, the original 10 is entirely converted into the digital signal.
An image which is converted into a digital signal is compressed by the above-described system of MH, MR, MMR or the like. The compressed signal is transmitted onto lines via a modem and then transmitted to another facsimile device on the end of the line.
A processing reverse to that of the sending end is performed at the receiving end. More specifically, the facsimile device at the receiving end converts a received analog signal into a digital signal. The converted digital signal is converted into an uncompressed digital signal by an expansion processing reverse to the compression processing. The resultant digital signal is printed by the same procedure as that employed when the original is read, so that the original image is obtained.
The compression/expansion of the original is directed to enhancing utilization efficiency of the lines and to reduction of communication time by reducing the amount of data to be transmitted.
FIGS. 3 and 4 show as an example the coding system of the MH method. An MH code is based on a one-dimensional run-length coding system. In this system, data of one line is formed of a series of variable-length codes. Each code represents a white or black run-length. A white run-length is called a "white run". A black run-length is called a "black run". A white run and a black run are generated alternately. All lines start with white run codes so as to ensure synchronization of signals for a receiver. If an actual scanning line starts with a black run, a code representing the white run having a length 0 is transmitted. The MH code includes two types of codes, i.e., a terminating code and a makeup code.
FIG. 3 shows the terminating code. The terminating code represents the run-length from 0 to 63 pixels. In order to enhance compression efficiency, a shorter code is allotted to a run-length frequently appearing in image information.
FIG. 4 shows the makeup code. The makeup code represents the run-length from 64 to 1728 pixels in combination with the terminating code. More specifically, the run-length from 64 to 1728 pixels is first coded by a makeup code indicating a run-length equal to or shorter than that run-length. A terminating code thereafter follows indicating the difference between the actual run-length and that represented by the makeup code.
The receiver can obtain uncompressed data by comparing the received data and a previously prepared table for decoding.
As described above, the compression of the transmitted data employing the codes enables the facsimile device to perform the image transmission in high efficiency and in short time.
The facsimile device, however, has the following disadvantages. When original 10 is properly supplied to the device, and the main scanning direction matches the extending direction of text lines 12, as shown in FIG. 1, highly efficient compression by coding is achieved.
However, when original 10 is supplied on the skew, and the main scanning direction does not match the direction of text lines 12, as shown in FIG. 2, the efficiency of compression decreases. This results from the following reasons.
As above mentioned, in the coding system, shorter codes are allotted to the run-lengths frequently appearing in the image information, whereas relatively long codes are allotted to the run-lengths less frequently appearing. Thus, when the direction of a main scanning line 14 read by a single main scanning does not match the direction of text lines 12, as shown in FIG. 2, the frequency of appearance of the run-lengths becomes irregular, resulting in lower efficiency of data compression.
In addition, suppose that the text lines are arranged with spacing d0 as shown in FIG. 1. When original 10 is supplied to the facsimile device in a proper direction, the main scanning line existing within this spacing d0 includes only one white run. Thus, an image of this part can be coded in very high efficiency by employing the above-described makeup code. On the other hand, when original 10 is supplied on the skew to the facsimile device as shown in FIG. 2, the scanning line including only one white run in the sub scanning direction is limited within a spacing d1. As apparent from the figures, spacing d1 is considerably shorter than spacing d0. Accordingly, the compression efficiency in the case shown in FIG. 2 is significantly degraded as compared to the case shown in FIG. 1.
To solve the foregoing problem, a facsimile device and the like performing the function of detecting and then correcting the skew of the original prior to coding are proposed in, e.g., Japanese Patent Laying-Open Nos. 55-154871, 62-206962, 63-88963, etc.
In Japanese Patent Laying-Open No. 55-154871, an original reading method is proposed in which paper including specific marks attached thereto is employed as an original in a facsimile device. The skew of the original can be recognized by detecting the marks upon reading of the original. Data is subject to the transformation of a coordinate system so as to compensate for this skew of the original. This enables an increase in efficiency of coding.
In Japanese Patent Laying-Open No. 62-206962, it is proposed to employ in an original scanner of a facsimile device, sensors for detecting the time when a leading edge of a supplied original passes. Detecting the difference in respective times when two parts of the leading edge of the original supplied at predetermined speed pass a predetermined sensor makes it possible to specify the spatial relationship between those two parts, and simultaneously the size of the supplied original. The amount of skew of the original can be informed based on the information of the spatial relationship and the size of the original. The compression efficiency of data can be enhanced by subjecting the data to the transformation of the coordinate system so as to compensate for the obtained skew of the original.
In Japanese Patent Laying-Open No. 63-88963, it is proposed to adopt to scanning of an original in a facsimile device, a method of detecting the time when one end (extending in a sub scanning direction) of the original is read in response to a change in signal level caused in reading of the original. In each of the main scannings, writing of data into an image memory starts upon the time when the end of the paper is detected. By employing this method, one end of the original is stored in the image memory in such a manner that the one end always be parallel with ends of the image memory. An image per se becomes the one from which the skew of the original is removed, resulting in enhanced compression efficiency.
The foregoing conventional art, however, still presents the following disadvantages. A language in which a text can be written in both vertical and lateral lines is taken as an example such as the Japanese language. In such a language, such a case may occur, as shown in FIG. 4A, that paper of A4 size on which the text is vertically written may be supplied to an original reading unit of a facsimile device in a longitudinal direction of the paper. In this case, compression efficiency can not be enhanced even if the skew of the original is detected and corrected.
Further, even when laterally written documents are supplied to the reading unit, the same problems take place if the documents are fed in a direction crossing the direction of text lines.